package com.hjc.springbootstudyweb.service.ServiceImpl;

import com.hjc.springbootstudyweb.entity.UsersModel;
import com.hjc.springbootstudyweb.mapper.UsersMapper;
import com.hjc.springbootstudyweb.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/11/30
 * Time: 16:49
 * To change this template use File | Settings | File Templates.
 */
@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    @Override
    public List<UsersModel> queryAll() {
        return usersMapper.queryAll();
    }

    @Override
    public UsersModel queryById(String uid, String password) {
        return usersMapper.queryById(uid,password);
    }

    @Override
    public int addUsers(UsersModel usersModel) {
        return usersMapper.addUsers(usersModel);
    }

    @Override
    public int deleteUsers(int utid) {
        return usersMapper.deleteUsers(utid);
    }
}
